import { Module } from 'vuex';
import { RootState } from '@/storeVuex';

export interface StateC {
  count: number;
  person: {
    name: string;
    age: number;
  };
}
export const moduleC: Module<StateC, RootState> = {
  namespaced: true,
  state: () => {
    return {
      count: 0,
      person: {
        name: 'moduleB',
        age: 12,
      },
    };
  },
  mutations: {
    increment(state: StateC) {
      state.count++;
    },
  },
};
